<?php
/**
 * <https://y.st./>
 * Copyright © 2017 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'title' => 'My last day off before school starts',
	'body' => <<<END
<section id="general">
	<h2>General news</h2>
	<p>
		I biked to the Dollar Tree to buy the last of their soy milk.
		I need to stock up while I can, as they don&apos;t always have it.
	</p>
	<p>
		I sat down to program group-based recipe support for <code>minequest</code>.
		At first, things did not go well.
		At all.
		First, every group-based recipe seemed to accept every item into a given mineral crafting tree, regardless of if they belonged to the group or groups in question.
		Then, no group-based crafting recipes seemed to bring anything into the crafting trees ever.
		Once I finally got it working correctly though, I got some surprising, yet completely correct, results.
		Coal lumps can be crafted into black dye.
		Black dye can be crafted with any colour of wool to make black wool.
		Black wool can be crafted with any colour of dye to make that colour of wool.
		Simply put, this means that any colour of wool can have a little coal in it, so coal can power any wool-based bonus.
		Strange, right?
		I think I&apos;ll keep that feature secret and see if anyone finds it and brings it up.
		Additionally, dye can be mixed to form other colours of dye.
		By bringing black dye into the list of mineral items, coal lumps brought all dye colours into the fold.
		I think coal might be the only mineral of the default ten (including wheat and cotton, which aren&apos;t logically minerals) to provide support for dye.
		It&apos;s not something that jumps straight to mind when I think of crafts involving coal, but it should make things more interesting.
		Again, I&apos;ll keep this to myself until someone mentions it.
		It&apos;ll be a little Easter egg.
	</p>
	<p>
		I&apos;ve got new, more flexible plans for <code>minequest</code>.
		Instead of third-party mods determining which eight minerals players will be able to get bonuses from, each player will decide that for themself.
		That&apos;ll allow all mineral stats to potentially have use, and allow players to get benefit from which minerals they most enjoy harvesting.
		Miners will use the eight actual minerals, most likely.
		Farmers will more-likely replace two to four of those with farm crops.
		By design though, choosing your minerals will be a bit of a commitment.
		Changing bonus items without changing minerals only requires disabling the bonus you want to switch out, then enabling the new bonus.
		However, switching even one of your minerals will require disabling <strong>*all*</strong> your bonuses.
		You can of course re-enable them after you switch, but if any of your bonuses were storing data, that data will be lost.
		For example, the steel door&apos;s bonus will likely be the ability to set up to a set number of warp points at places you&apos;ve been on the map.
		This number will be determined by the amount of iron you&apos;ve mined.
		When you disable that bonus though, all your warp points are deleted.
		If you turn that bonus back on later and want those warp points back, you&apos;ll have to go back and visit those places on foot and re-bookmark them!
		Other bonuses have less severe consequences for temporarily disabling them though.
		For example, the powered rail probably will boost your walking speed.
		Disabling it would set you back to your normal speed, but you get your speed boost back right away when you re-enable it.
		The new, more-dynamic setup of <code>minequest</code> will probably require a complete rewrite of everything I&apos;ve coded for it before getting <code>minestats</code> pretty much in order.
		That&apos;ll be a pain, but I think it&apos;ll be worth it for the results.
	</p>
	<p>
		I didn&apos;t get anywhere close to finishing the configuration interface, which must be completed before I can move on to anything else (otherwise, I won&apos;t be able to test the features as I program them, as they depend on the configuration), but I feel like I got a lot done.
		It doesn&apos;t look like much, but I learned to use the item stack meta data $a[API] enough to get the beginnings of the interface to self-organise when players move everything around, and I corrected the item-cloning issue that arose from not knowing which items were pulled from the options already if a player switches out of the configuration menu before saving.
		I also coded a callback to prevent item stacks in the configuration interface from being split if they contain multiple items or combined ever.
		None of the items in this interface are usable by the player, they&apos;re just an abstraction to make configuration easy and intuitive.
		Unexpected stacks caused by splitting and merging only serve to cause trouble and make the interface seem broken.
		If I chisel away at this a little more, I should have the configuration page in working order.
		It was time to put down the code though and take a break.
		I headed to a local park on my bicycle to unwind.
	</p>
	<p>
		Island Park quickly became boring, so I left and wandered the town on my bike instead.
		As usual, I let my mind wander.
		At first, I just thought about how far I&apos;d managed to progress with <code>minequest</code>.
		The true purpose of <code>minestats</code> is to act as a base for <code>minequest</code> to build off of, and that alone was quite a chunk of code to write.
		<code>minequest</code> proper is coming together now as well.
		After a bit though, I started actually thinking about what I need to work on next in the code.
		The obvious next step was to experiment with and learn to use Minetest inventory loops.
		Though still unusable, <code>minequest</code> has evolved past its limited ability to make use of only eight, hard-coded minerals.
		Now, it supports more than just minerals, and certainly up to more than eight.
		However, despite its more dynamic nature, it&apos;s still limited to forty countable items, due to the inventory size of the configuration screen and the fact that eight slots are reserved for dumping unwanted, previously-used countable items.
		If I could get an inventory loop going, I could set an arbitrary inventory size, exactly the size needed, and it&apos;d all be accessible.
		However, I came to the realisation that that plan would kill my ability to reserve those eight slots on each page.
		I could set aside a separate inventory that <strong>*looks*</strong> like a part of the first, but if inventory loops work anything like the way I think they do (that is, they work client-side), I wouldn&apos;t be able to clear the empty slots when the page is turned.
		I could clear them as soon as they were used, but I might as well set up an ugly trash slot if I was going to do that.
		It&apos;s not what I&apos;m after.
		I know exactly how to achieve the effect I&apos;m after without an inventory loop, but I was going to try an inventory loop anyway because I thought it was the right way to do it.
		Now that I know it&apos;s not, I can focus on doing it the way that&apos;ll actually work.
		I&apos;ll still need to learn how to use inventory loops later though, as they&apos;ll no doubt be useful for the locked chest bonus.
	</p>
	<p>
		Next, I started thinking about the main hub towns of the server I want to one day host.
		I have nine towns, and eight minerals.
		But now ... I&apos;ve made farm plants countable.
		Should I not represent them with towns?
		That brings the total town themes to ten though, while there are still only nine hub towns, and it&apos;s going to stay that way.
		My first thought was to combine the farm plant towns.
		This combined-theme town could still dawn the centre town&apos;s original planned name, World&apos;s Navel.
		Not only is it at the centre of the world, but also, its theme would be generation, mostly in the form of farm crops.
		That wouldn&apos;t be paying due respect to the farming aspect of the game though.
		It&apos;s true that I love mining and I&apos;m not really a fan of farming.
		However, this isn&apos;t my personal, private world, and I shouldn&apos;t be pushing one aspect any more than any other, save for the aspects I&apos;m adding myself in the form of <code>minequest</code>.
		Than means I&apos;ll need to leave out a mineral.
		But which one?
		Again, I thought to leave out one of the farm plants, but again, that answer was clearly dead wrong.
		Even including both farm plants, the farm towns will still be outnumbered by the mining towns.
		There&apos;s nothing I can do about that, but I shouldn&apos;t make it worse.
		After a while though, it dawned on me: I should leave out flint!
		You can&apos;t actually build anything out of flint.
		The town of Flint; the only one of the nine towns to be named directly after a mineral instead of having a name composed of a mineral and something to make it sound like a town, such as Tin Town and Mesetropolis; was already planned to be a total sham.
		It was going to mirror Coal City, using mostly coal-themed node, but with them set on fire.
		Eliminating Flint removes this anomaly.
		Besides, flint is a stupid mineral.
		It&apos;s only use seems to be to consume the greatest mineral, iron.
	</p>
	<p>
		Now, I had the job of figuring out which town should be in the centre.
		Whatever town ended up in the centre would become the permanent spawn town eventually, if all went well.
		The obvious choice was one of the farm towns.
		A nice town that promoted sustainability would be an excellent choice.
		However, there was a catch.
		I want similar towns to be across the map from one another.
		I&apos;d already put the minerals in pairs.
		Tin and copper were paired, as their main purpose in-game is to be combined into bronze.
		Gold and iron go together, as all ownable nodes have some iron in them and gold&apos;s primary function is to craft keys with which to share what you own.
		Diamond and mese form a pair because they&apos;re the hardest minerals of the game.
		In their ore form, they&apos;re the only two ores incapable of being mined with a renewable pick.
		Flint and coal form a pair as both are needed to form the permanent flame node.
		The two farm crops would obviously form a pair as well.
		The odd one out now seemed to be coal, as its mate had been dropped.
		But do I want Coal City to be the main town for ever?
		No, that would be terrible!
		It could be interpreted as just a game, which would be fine, but it could also be interpreted as being in favour of fossil fuels.
		I never burn coal in-game because it&apos;s a finite resource, but that&apos;s not what it would look like.
		But what else could coal pair with?
		Tin and bronze are inseparable as a pair.
		Pairing either with something else would look stupid.
		The farm crops are likewise a pair not to be split up.
		That leaves gold/iron and diamond/mese.
		I&apos;d love to put the iron town in the centre, but coal doesn&apos;t seem like it pairs with gold well.
		Besides, I like iron the best, but that doesn&apos;t mean everyone does.
		Could I justify making the main town&apos;s theme be iron?
		Probably not.
		But then it hit me.
		Coal and diamond are both made of carbon in the real world, while mese isn&apos;t even real.
		Coal and diamond can form a pair, leaving mese, a substance unique to Minetest, as the theme of the centre town.
		It would look like the main town was sort of a tribute to the game.
		Perfect!
		There shouldn&apos;t be anything objectionable about that at all.
	</p>
	<p>
		Now that I&apos;m home, I came up with a couple other ideas.
		First, I could&apos;ve combined the copper-themed city and the tin-themed city to form a single copper-, tin-, and bronze-themed town.
		I&apos;m not doing that though, as I&apos;d much rather remove flint from the lineup if I&apos;ve got a valid excuse to do so.
		And I do.
		Second, <code>minestats</code> (and therefore <code>minequest</code>) treats wheat and cotton each as two minables; one that drops one of the crop and one that drops two.
		Should there be a second cotton-themed city and a second wheat-themed city?
		Maybe.
		They wouldn&apos;t be one of the main nine though.
		And if I start expanding after the main nine are in place, should flint finally get a city too?
		Should clay, which <code>minestats</code> deliberately doesn&apos;t count, also get a city eventually because it still drops craft items?
		I don&apos;t know.
		That&apos;ll be a long way off though, if it ever even comes to that.
		It&apos;ll take several years to get the tunnels between the main nine cities set up, and after that, I might just start something else instead of continuing the tunnel project.
		That several-year estimate also ignores the fact that last time, people asked me to provide tunnels to their places.
		If that happens again this time, and continues happening, we might not even make it past the first or second hub town, let alone have time to make it to outlying towns.
	</p>
	<p>
		My <a href="/a/canary.txt">canary</a> still sings the tune of freedom and transparency.
	</p>
</section>
<section id="dreams">
	<h2>Dream journal</h2>
	<p>
		I dreamed I Was at a New Year&apos;s Eve party with my coworkers.
		I didn&apos;t realise what the party was at the time.
		It was getting late, so I wad about to head home, but one of my coworkers stopped me.
		They offered me beer, but I declined, as I don&apos;t drink.
		They then offered me hot dogs, which again, I don&apos;t eat, but I decided to stay because they seemed intent on having me there.
		They then asked me to explain my name change to them, though they thought I had changed <strong>*from*</strong> Alex Yyst to some name I&apos;d never heard of.
		I explained that I had actually changed my name <strong>*to*</strong> Alex Yst, and that it was Yst, not Yyst.
		They still couldn&apos;t pronounce my name though.
		I woke up before I could answer their questions about what the name means though.
		They thought the name might be Canadian.
	</p>
	<p>
		It was too early to be awake, so I went back to bed.
		I dreamed I arrived back home from work to find thin smoke streaming from my laptop, which was on my bed.
		I thought the thing had overheated and was burning the sheets.
		The sheets were fine though, it was coming from the computer itself.
		I&apos;ve known I need to replace this thing soon, but with it smoking, the tame table on that just got moved up.
		Now that I&apos;m awake though, I&apos;m going to continue putting off replacing it for a while.
		I simply don&apos;t have extra money to spare.
	</p>
</section>
<section id="mental">
	<h2>Mental health watch</h2>
	<p>
		I have an active imagination.
		When I&apos;m travelling or doing mindless work, I like to have a puzzle to work on, usually a programming problem that I&apos;m trying to solve.
		When I don&apos;t have one, or even sometimes when I do, I daydream, often about magic.
		My magic form, as well as the magic forms of others, tend to have patterned markings on our skin.
		While everyone else&apos;s markings are symmetrical or almost-so, in the past, I&apos;ve always imagined my markings as showing up only on my left half.
		My right half has been completely normal-looking, save for whatever skin and hair colours I&apos;ve had at the time.
		Last night though, I noticed that this hasn&apos;t been the case lately.
		I&apos;ve imagined my markings as being symmetrical as everyone else&apos;s.
		I kind of wonder if this is my subconscious telling me that I felt like half a person before, and that I feel more whole now.
	</p>
</section>
END
);
